home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / cxref.arc / CXREF.DOC < prev   
Encoding:
Text File  |  1987-03-24  |  4.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4.                               C Source X-Ref Generator
  5.  
  6.  
  7.             The extension  to CPRINT was a C tutorial for me.  I had two
  8.             objectives in mind.
  9.  
  10.             1. I needed to gain some experience with a new DataLight C
  11.                compiler.  This program was my first conversion effort
  12.                with DataLight.
  13.  
  14.             2. While working on another C program I needed an old
  15.                crutch, the Cross-Reference.  After looking for one in
  16.                the Public Domain I concluded there wasn't one available.
  17.  
  18.             The source  contained in  this archive is a simple extension
  19.             to one  of the  CPRINT programs  offered on several BBS.  It
  20.             was a  fun program  for me  to get  some experience  with  C
  21.             pointers.   Perhaps you  will enjoy  extending it to support
  22.             new features.
  23.  
  24.             While working  on the  program I  realized I  needed a  more
  25.             sophisticated C  language parser.  The one contained in this
  26.             source is  almost identical  to the  original CPRINT  and is
  27.             basically a  simple word  identifier.   For this  reason the
  28.             program does not support the cross-reference of internal and
  29.             external variables  for subroutines  contained in  one input
  30.             file.  All unique variables found in the source file will be
  31.             lumped into  one cross-reference  listing.   This would be a
  32.             good challenge for another needing some C fun.
  33.  
  34.             I did  change the  interface to  CPRINT significantly.   All
  35.             controls are entered in the command line:
  36.  
  37.                  CPRINT filename [/L] [/Q] [/X] [/D] [/Pprintfile]
  38.  
  39.             The  filename  can  be  entered  without  extensions.    The
  40.             extension 'C'  will be  assumed as  is common with several C
  41.             compilers.   The filename  and options can be entered in any
  42.             order on the command line.  The filename is the one required
  43.             argument.
  44.  
  45.             OPTION      DESCRIPTION
  46.  
  47.               /L        No listing of the input source file will be
  48.                         provided if this option is present in the
  49.                         command line.  If not present a listing of the
  50.                         input source will be provided.
  51.  
  52.               /Q        Standard C reserved words will not be include in
  53.                         the cross-reference.  All other word variables
  54.                         including single and double quote items will be
  55.                         handled by the cross-reference.  If this option
  56.                         is detected in the command line single and
  57.                         double quote words will not be included in the
  58.                         cross-reference.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                        Page: 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                               C Source X-Ref Generator
  71.  
  72.  
  73.               /X        The cross-reference is normally generated by the
  74.                         program.  If this option is detected in the
  75.                         command line the cross-reference will not be
  76.                         developed.  The program will run much faster and
  77.                         will still produce the balancing report of
  78.                         quotes and parentheses.
  79.  
  80.               /D        The program will normally produce a simple
  81.                         directory report of each function found in the
  82.                         input source.  The line number corresponding to
  83.                         the source listing (see /L) will be printed
  84.                         adjacent to the function's name.  If this option
  85.                         is found in the command line the directory will
  86.                         not be printed.
  87.  
  88.               /P        Normally the program will print all output to
  89.                         the PRN (standard output) name.  If you require
  90.                         the output to be sent to another destination use
  91.                         this option.  Immediately after the /P key in
  92.                         the destination.  For example, if you wanted the
  93.                         output to go to file XREF.LST you would submit
  94.                         the following command line:
  95.                         
  96.                         CPRINT source_name /Pxref.lst
  97.  
  98.             I hope you have fun with this program, and perhaps it will
  99.             save a few hours while debugging a silly mistake
  100.             
  101.                       GOOD PROGRAMMING
  102.             
  103.                       Bud Curtis
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                        Page: 2
  131.  
  132.  
  133.